package sketch.shape.arrow;

import java.awt.Graphics2D;
import java.awt.Shape;

import sketch.shape.geom.prim.Point;
import sketch.shape.geom.prim.gVector;

public class DiamondArrowHead extends OpenArrowHead {

	public DiamondArrowHead() {

	}

	public Point getHeadSideP3() {
		gVector v = getTail().subtract(getHead()).dir().unitized()
			.multiply(2 * getLength() * Math.cos(getAngle()));
		return getHead().add(v);
	}

	protected void drawHead(Graphics2D g2) {
		super.drawHead(g2);
		Point p1 = getHeadSideP1();
		Point p2 = getHeadSideP2();
		Point p = getHeadSideP3();
		g2.drawLine(p.intX(), p.intY(), p1.intX(), p1.intY());
		g2.drawLine(p.intX(), p.intY(), p2.intX(), p2.intY());
	}

	public Shape getBound(double GAP) {
		// TODO
		return super.getBound(GAP);
	}


}
